#include <common/Device.h>

#include <bits/stdc++.h>
#include <boost/algorithm/string.hpp>
#include <fstream>

namespace flashpp {

Port&
Device::getCreatePort(std::string name) {
  if (nameToPort_.find(name) == nameToPort_.end()) {
    nameToPort_.emplace(
        std::piecewise_construct,
        std::forward_as_tuple(name),
        std::forward_as_tuple(name, *this));
  }

  return nameToPort_.at(name);
}

}